package com.example.demo6301.api;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;

@RestController
@RequestMapping("user")
public class UserController {
    @RequestMapping("me")
    private String showMe(Principal principal) {
        return String.format("当前登录用户为：「%s」", principal.getName());
    }
}